<?php
class Image {

  public $folder = 'ivq';
  
  public function data($image) {
    
    $cond_vals = new stdClass();
    $cond_vals->c = 't.image_id = :v1';
    $cond_vals->v = array(':v1' => $image->id);
    $result = DbUtils::get(DbUtils::createPdoInst(), TABLE_NAME_PREFIX_CUSTOM . $this->folder . '_note', $cond_vals, NULL, NULL, NULL, NULL, NULL);
    $image->notes = $result->d;
    
    $cond_vals = new stdClass();
    $cond_vals->c = 't.image_id = :v1';
    $cond_vals->v = array(':v1' => $image->id);
    $result = DbUtils::get(DbUtils::createPdoInst(), TABLE_NAME_PREFIX_CUSTOM . $this->folder . '_number', $cond_vals, NULL, NULL, NULL, NULL, NULL);
    $image->numbers = $result->d;
    
    $cond_vals = new stdClass();
    $cond_vals->c = 't.image_id = :v1';
    $cond_vals->v = array(':v1' => $image->id);
    $result = DbUtils::get(DbUtils::createPdoInst(), TABLE_NAME_PREFIX_CUSTOM . $this->folder . '_line', $cond_vals, NULL, NULL, NULL, NULL, NULL);
    $image->lines = $result->d;
    return $image;
  }
}
?>